<?php

namespace App\Http\Controllers;

use App\Http\Requests\ZhuangxiuRequest;
use App\Models\ZhuangXiu;
use Illuminate\Http\Request;

class ZhuangxiuController extends Controller
{
    public function save(ZhuangxiuRequest $zhuangxiuRequest)
    {
        $user = $zhuangxiuRequest->user();
        $area = $zhuangxiuRequest->input('area');
        $kaijian = $zhuangxiuRequest->input('kaijian');
        $jinshen = $zhuangxiuRequest->input('jinshen');
        $cenggao = $zhuangxiuRequest->input('cenggao');
        $fengge = $zhuangxiuRequest->input('fengge');
        $yaoqiu = $zhuangxiuRequest->input('yaoqiu');
        $zhuangxiu = new ZhuangXiu();
        $zhuangxiu->area=$area;
        $zhuangxiu->kaijian=$kaijian;
        $zhuangxiu->jinshen=$jinshen;
        $zhuangxiu->cenggao=$cenggao;
        $zhuangxiu->fengge=$fengge;
        $zhuangxiu->yaoqiu=$yaoqiu;
        $zhuangxiu->user_id=$user->id;
        $zhuangxiu->save();
        return [
            'code'=>200,
            'message'=>'提交成功',
            'data'=>[]
        ];

    }
}
